﻿<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
	#div{
		position: absolute;
		top:0;
		left:0;
		margin:0;
		width: 200px;
		height: 0px;
		background: rgba(234,134,234,.5);
	}
	</style>
</head>
<body>
 <button>弹出</button>
 <div id="div"></div>

 <script src="slowMove1.js"></script>
 <script>
 var oDiv=document.getElementById("div"),
 	but=document.querySelector("button");
 	console.log(but);
 	but.onclick=function(){ 
        setTimeout(function(){//第2S展出
         	slowMove(oDiv, 200,"height");
         },2000);
        setTimeout(function(){//5S后变0
         	slowMove(oDiv, 0,"height");
         },5000);
 	}
 </script>
</body>
</html>